Ext.define('AmpleHarvest.objects.content.content',
		{
			extend			: 'Ext.panel.Panel',
			alias			: 'widget.ampleharvest-objects-content-content',
			autoScroll		: true,
			cls				: 'html',
			border			: 0,
			bodyStyle		: 'padding:5px;',
			// MEMBER VARIABLES
			
			// PASSED MEMBER VARIABLES
			// REQUIRED
			m_str_data_source	: false,
			
			// OPTIONAL
			m_obj_params		: {},
			m_str_keyID			: '',

			listeners		:
			{
				dataResponse	: function(obj_response)
				{

					var content = obj_response.success == 'false' ? obj_response.message : obj_response.data.content;
					
					this.update(content);
					this.AHcaller.fireEvent('objectResponse', this.m_str_keyID, this);
				},
				
				beforedestory	: function(obj_self)
				{
					obj_self.m_obj_util.destroy();
				}
			},
			
			initComponent	: function()
			{
				if(this.m_str_data_source)
				{
					this.m_obj_util = Ext.create('AmpleHarvest.util.utility');
					this.m_obj_util.AHcaller = this;

					this.m_obj_util.getData(this.m_str_data_source, this.m_obj_params, {},'GET', {}, {});
				} else {
					this.html = "This object requires a resource path as m_str_data_source";
				}
					
				this.callParent();
			},

			highlight		: function(hl_object, str_Class, str_Attrib)
			{
				if (!str_Attrib)
				{
					str_Attrib = 'element_id';
				}

				var DOM_Object = this.getEl().select('element[' + str_Attrib
						+ '=' + hl_object + ']');
				
				DOM_Object.set(
						{
							'class'	: str_Class
						}, true);
			}
		});